if (remoteDirTree.data[remoteDirTree.selection.currentIndex].open) { // if remoteDirTree is open
gFtp.removeCacheEntry(remoteDirTree.data[remoteDirTree.selection.currentIndex].path); // clear out cache entry
gFtp.list(remoteDirTree.data[remoteDirTree.selection.currentIndex].path, "remoteTree.refreshCallback(" + remoteDirTree.selection.currentIndex + ")", false); // get data for this directory
} else {
remoteDirTree.data[remoteDirTree.selection.currentIndex].empty = false; // not empty anymore
remoteDirTree.data[remoteDirTree.selection.currentIndex].children = null; // reset its children
if (this.selection.count == 0 || !gFtp.isConnected || !isReady()) {
return;
}
try {
var count = 0;
for (var x = 0; x < remoteTree.rowCount; ++x) {
if (remoteTree.selection.isSelected(x)) {
++count;
let tmpFile = Components.classes["@mozilla.org/file/directory_service;1"].createInstance(Components.interfaces.nsIProperties).get("TmpD", Components.interfaces.nsILocalFile);